package com.aihwcm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Aihuserroles entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "aihuserroles", catalog = "aihwcmdb")
public class Aihuserroles implements java.io.Serializable {

	// Fields

	private Integer userroleid;
	private Aihusers aihusers;
	private Aihroles aihroles;

	// Constructors

	/** default constructor */
	public Aihuserroles() {
	}

	/** full constructor */
	public Aihuserroles(Aihusers aihusers, Aihroles aihroles) {
		this.aihusers = aihusers;
		this.aihroles = aihroles;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "userroleid", unique = true, nullable = false)
	public Integer getUserroleid() {
		return this.userroleid;
	}

	public void setUserroleid(Integer userroleid) {
		this.userroleid = userroleid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "userid")
	public Aihusers getAihusers() {
		return this.aihusers;
	}

	public void setAihusers(Aihusers aihusers) {
		this.aihusers = aihusers;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "roleid")
	public Aihroles getAihroles() {
		return this.aihroles;
	}

	public void setAihroles(Aihroles aihroles) {
		this.aihroles = aihroles;
	}

}